import { SpeedGauge, Battery, LineChart, GaugeChart, RingChart } from '@/components';
// import { SpeedGauge, Battery, LineChart, DirAngleDashBoard } from "@/components";
import {
  AlertOutlined,
  WifiOutlined,
  ThunderboltOutlined,
  MonitorOutlined,
} from "@ant-design/icons";
import { useState } from "react";

import Indicator from '@/components/Indicator/Indicator';

export default function DashBoard() {
  const list = [
    { time: "11:30", value: 400 },
    { time: "11:31", value: 932 },
    { time: "11:32", value: 1190 },
    { time: "11:33", value: 360 },
    { time: "11:34", value: 1290 },
    { time: "11:35", value: 400 },
    { time: "11:36", value: 932 },
    { time: "11:37", value: 1190 },
    { time: "11:38", value: 360 },
    { time: "11:39", value: 1290 },
  ];

  return (

    <div className="size-full  flex flex-col">
      <div className=" flex-1 flex flex-row  border-2 border-rose-500">
        <div className="w-1/5">
        <GaugeChart value={56}></GaugeChart>
        </div>
        <div className="w-3/5  border-2 border-rose-500">
         
          <SpeedGauge value={56} width={30}></SpeedGauge>
        </div>
        <div className="w-1/5">
        {/* <GaugeChart value={56}></GaugeChart> */}

        <RingChart value={76} width={10}></RingChart>
        </div>
      </div>
      <div className=" border-2 border-rose-500">

        <div className="p-4 flex flex-row justify-between items-center gap-4">
          <div className="">
            <div className='flex flex-wrap justify-center flex-row gap-2'>
              <Indicator size={50} value={0} title="系统故障">
                <>
                  <path
                    d="M512 923.008c-100.384 0-200.768-38.208-277.184-114.624-152.832-152.832-152.832-401.536 0-554.368 152.832-152.832 401.536-152.832 554.368 0 152.832 152.832 152.832 401.536 0 554.368-76.416 76.416-176.8 114.624-277.184 114.624z m0-726.048c-85.632 0-171.264 32.608-236.448 97.792-130.368 130.368-130.368 342.528 0 472.928 130.368 130.4 342.528 130.4 472.928 0 130.368-130.368 130.368-342.528 0-472.928-65.216-65.184-150.848-97.792-236.48-97.792z"
                    p-id="2017"></path>
                  <path
                    d="M570.4 160H454.4l17.184-80h81.632zM375.36 180.96L274.912 238.976l-25.12-77.888 70.688-40.832zM216.96 296.64l-57.984 100.448-60.704-54.88 40.8-70.688zM137.6 476V592l-80-17.184v-81.632zM158.56 671.04l58.016 100.448-77.888 25.12-40.832-70.688zM274.24 829.44l100.448 57.984-54.88 60.704-70.688-40.8zM453.6 908.8H569.6l-17.184 80h-81.632zM648.64 887.84l100.448-58.016 25.12 77.888-70.688 40.832zM807.04 772.16l57.984-100.448 60.704 54.88-40.8 70.688zM886.4 592.8V476.8l80 17.184v81.632zM865.44 397.76l-58.016-100.448 77.888-25.12 40.832 70.688zM749.76 239.36l-100.448-57.984 54.88-60.704 70.688 40.8zM551.552 602.88v-279.296c0-52.256-81.216-52.352-81.216 0v279.296c-0.032 52.256 81.216 52.352 81.216 0z"
                    p-id="2018"></path>
                  <path d="M510.944 730.528m-50.272 0a50.272 50.272 0 1 0 100.544 0 50.272 50.272 0 1 0-100.544 0Z" p-id="2019"></path>
                </>
              </Indicator>
              <Indicator size={50} value={2} title="VCU故障">
                <>
                  <path
                    d="M512.384 99.264c-227.968 0-412.8 184.832-412.8 412.8s184.832 412.8 412.8 412.8 412.8-184.832 412.8-412.8-184.8-412.8-412.8-412.8z m255.712 668.48c-68.288 68.288-159.104 105.92-255.68 105.92s-187.392-37.6-255.68-105.92c-68.288-68.288-105.92-159.104-105.92-255.68s37.6-187.392 105.92-255.68c68.288-68.288 159.104-105.92 255.68-105.92s187.392 37.6 255.68 105.92 105.92 159.104 105.92 255.68-37.632 187.392-105.92 255.68z"
                    p-id="1248"></path>
                  <path
                    d="M272.64 522.624h87.872v-31.968H272.64v-66.752h103.936v-31.776H234.944v239.84h145.12v-31.936H272.64zM550.144 398.976c-13.76-4.544-29.568-6.848-47.36-6.848h-72.48v239.84h37.664v-90.752h36.224c17.28 0 32.704-2.752 46.336-8.256 13.6-5.504 24.32-13.92 32.096-25.184s11.68-25.664 11.68-43.168c0-18.016-3.904-32.32-11.776-42.912-7.808-10.592-18.592-18.176-32.384-22.72z m-6.912 100.608c-9.28 7.52-23.488 11.296-42.688 11.296h-32.576v-88.224h31.328c19.072 0 33.472 3.04 43.232 9.152 9.76 6.08 14.624 17.024 14.624 32.832 0 15.744-4.64 27.424-13.92 34.944zM776.096 525.472c-9.152-9.76-20.864-17.632-35.04-23.68l-32.896-13.984a285.28 285.28 0 0 1-18.592-8.416c-5.92-2.976-10.784-6.656-14.528-11.04-3.776-4.384-5.632-10.08-5.632-17.088 0-9.44 3.68-16.864 11.04-22.336 7.36-5.472 17.152-8.192 29.312-8.192 10.592 0 20.16 1.92 28.672 5.728 8.544 3.808 16.544 9.056 24.096 15.744l19.872-24.16c-9.12-9.216-20-16.544-32.672-22.016-12.672-5.472-25.984-8.192-39.968-8.192-15.168 0-28.672 2.88-40.544 8.672-11.872 5.792-21.184 13.632-27.968 23.616-6.784 9.952-10.176 21.248-10.176 33.856 0 11.552 2.464 21.408 7.392 29.568s11.136 14.912 18.592 20.256c7.456 5.344 15.072 9.664 22.816 12.96l33.216 14.304c7.328 3.296 13.888 6.464 19.712 9.536 5.824 3.072 10.4 6.848 13.76 11.296 3.328 4.448 5.024 10.336 5.024 17.632 0 10.08-3.936 18.24-11.776 24.48-7.84 6.24-19.008 9.376-33.536 9.376-11.552 0-22.912-2.56-34.08-7.712s-21.12-12-29.792-20.576l-22.08 25.92c10.912 11.136 23.776 19.776 38.528 25.984 14.784 6.208 30.4 9.312 46.816 9.312 17.472 0 32.512-3.168 45.056-9.472s22.24-14.72 28.992-25.28 10.176-22.24 10.176-35.04c-0.064-17.632-4.64-31.296-13.792-41.056z"
                    p-id="1249"></path>
                </>
              </Indicator>
              <Indicator size={50} value={1} title="BMS故障">
                <>
                  <path
                    d="M749.216 892.096l-27.136-43.424C839.008 775.584 908.8 649.728 908.8 512c0-133.216-66.336-256.832-177.408-330.688l28.352-42.624C885.12 222.048 960 361.6 960 512c0 155.488-78.784 297.568-210.784 380.096zM274.784 892.128C142.816 809.568 64 667.488 64 512c0-150.4 74.88-289.952 200.256-373.312l28.352 42.624C181.536 255.168 115.2 378.784 115.2 512c0 137.728 69.792 263.584 186.72 336.704l-27.136 43.424z"
                    p-id="1094"></path>
                  <path
                    d="M512 848c-185.28 0-336-150.72-336-336S326.72 176 512 176s336 150.72 336 336-150.72 336-336 336z m0-620.8c-157.024 0-284.8 127.776-284.8 284.8 0 157.056 127.776 284.8 284.8 284.8 157.056 0 284.8-127.744 284.8-284.8 0-157.024-127.744-284.8-284.8-284.8z"
                    p-id="1095"></path>
                  <path
                    d="M427.296 683.456V346.944h101.696c24.992 0 47.136 3.2 66.464 9.6 19.328 6.4 34.496 17.024 45.504 31.904 11.008 14.88 16.512 34.944 16.512 60.224 0 24.544-5.472 44.704-16.384 60.544-10.912 15.84-25.952 27.616-45.056 35.328-19.104 7.744-40.768 11.584-65.024 11.584h-50.848v127.328h-52.864z m52.864-169.92h45.728c26.912 0 46.88-5.28 59.872-15.84 13.024-10.56 19.52-26.912 19.52-49.056s-6.848-37.504-20.512-46.048c-13.696-8.544-33.888-12.832-60.672-12.832h-43.936v123.776z"
                    p-id="1096"></path>
                  <path d="M252.2912 697.0688l454.4-454.4 36.2048 36.2016-454.4 454.4z" p-id="1097"></path>
                </>
              </Indicator>
              <Indicator size={50} value={1} title="M1电机">
                <>
                  <path
                    d="M814.848 835.584l-35.008-37.376c80.064-74.944 124.16-176.608 124.16-286.208 0-216.16-175.84-392-392-392S120 295.84 120 512c0 109.44 43.968 210.976 123.808 285.888l-35.04 37.344C119.808 751.744 68.8 633.952 68.8 512 68.8 267.616 267.616 68.8 512 68.8S955.2 267.616 955.2 512c0 122.144-51.168 240.064-140.352 323.584z"
                    p-id="2326"></path>
                  <path
                    d="M721.216 890.816l184.256-39.584-144.672-144.672zM317.856 701.184l150.4-453.824h82.4l150.368 453.824h-75.776l-38.208-129.312H429.44l-38.784 129.312H317.856z m146.464-246.304l-18.336 61.056h123.904l-18.048-61.056c-7.616-24.672-14.88-49.568-21.792-74.752-6.912-25.152-13.792-50.56-20.608-76.224h-3.008c-6.624 25.856-13.44 51.328-20.448 76.384a3969.92 3969.92 0 0 1-21.664 74.592z"
                    p-id="2327"></path>
                </>
              </Indicator>
              <Indicator size={50} value={0} title="M2电机">
                <>
                  <path
                    d="M814.848 835.584l-35.008-37.376c80.064-74.944 124.16-176.608 124.16-286.208 0-216.16-175.84-392-392-392S120 295.84 120 512c0 109.44 43.968 210.976 123.808 285.888l-35.04 37.344C119.808 751.744 68.8 633.952 68.8 512 68.8 267.616 267.616 68.8 512 68.8S955.2 267.616 955.2 512c0 122.144-51.168 240.064-140.352 323.584z"
                    p-id="2326"></path>
                  <path
                    d="M721.216 890.816l184.256-39.584-144.672-144.672zM317.856 701.184l150.4-453.824h82.4l150.368 453.824h-75.776l-38.208-129.312H429.44l-38.784 129.312H317.856z m146.464-246.304l-18.336 61.056h123.904l-18.048-61.056c-7.616-24.672-14.88-49.568-21.792-74.752-6.912-25.152-13.792-50.56-20.608-76.224h-3.008c-6.624 25.856-13.44 51.328-20.448 76.384a3969.92 3969.92 0 0 1-21.664 74.592z"
                    p-id="2327"></path>
                </>
              </Indicator>
            </div>
          </div>
          <div className="flex-1 p-2">
            <div className='flex flex-row justify-center'>
              <Battery style={{ width: '100px', height: '50px' }} fontSize={20} value={45}></Battery>
            </div>

            <div className='flex flex-row justify-around  text-white text-lg  pt-4'>
              <div>
                电量：20%
              </div>
              <div>
                车速：20%
              </div>
              <div>
                档位：20%
              </div>
              <div>
                故障：20%
              </div>
              <div>
                网络：20%
              </div>
            </div>
          </div>
          <div className="">
            <div className='flex flex-wrap  flex-row gap-2'>
              <Indicator size={50} value={0} title="系统故障">
                <>
                  <path
                    d="M512 923.008c-100.384 0-200.768-38.208-277.184-114.624-152.832-152.832-152.832-401.536 0-554.368 152.832-152.832 401.536-152.832 554.368 0 152.832 152.832 152.832 401.536 0 554.368-76.416 76.416-176.8 114.624-277.184 114.624z m0-726.048c-85.632 0-171.264 32.608-236.448 97.792-130.368 130.368-130.368 342.528 0 472.928 130.368 130.4 342.528 130.4 472.928 0 130.368-130.368 130.368-342.528 0-472.928-65.216-65.184-150.848-97.792-236.48-97.792z"
                    p-id="2017"></path>
                  <path
                    d="M570.4 160H454.4l17.184-80h81.632zM375.36 180.96L274.912 238.976l-25.12-77.888 70.688-40.832zM216.96 296.64l-57.984 100.448-60.704-54.88 40.8-70.688zM137.6 476V592l-80-17.184v-81.632zM158.56 671.04l58.016 100.448-77.888 25.12-40.832-70.688zM274.24 829.44l100.448 57.984-54.88 60.704-70.688-40.8zM453.6 908.8H569.6l-17.184 80h-81.632zM648.64 887.84l100.448-58.016 25.12 77.888-70.688 40.832zM807.04 772.16l57.984-100.448 60.704 54.88-40.8 70.688zM886.4 592.8V476.8l80 17.184v81.632zM865.44 397.76l-58.016-100.448 77.888-25.12 40.832 70.688zM749.76 239.36l-100.448-57.984 54.88-60.704 70.688 40.8zM551.552 602.88v-279.296c0-52.256-81.216-52.352-81.216 0v279.296c-0.032 52.256 81.216 52.352 81.216 0z"
                    p-id="2018"></path>
                  <path d="M510.944 730.528m-50.272 0a50.272 50.272 0 1 0 100.544 0 50.272 50.272 0 1 0-100.544 0Z" p-id="2019"></path>
                </>
              </Indicator>
              <Indicator size={50} value={2} title="VCU故障">
                <>
                  <path
                    d="M512.384 99.264c-227.968 0-412.8 184.832-412.8 412.8s184.832 412.8 412.8 412.8 412.8-184.832 412.8-412.8-184.8-412.8-412.8-412.8z m255.712 668.48c-68.288 68.288-159.104 105.92-255.68 105.92s-187.392-37.6-255.68-105.92c-68.288-68.288-105.92-159.104-105.92-255.68s37.6-187.392 105.92-255.68c68.288-68.288 159.104-105.92 255.68-105.92s187.392 37.6 255.68 105.92 105.92 159.104 105.92 255.68-37.632 187.392-105.92 255.68z"
                    p-id="1248"></path>
                  <path
                    d="M272.64 522.624h87.872v-31.968H272.64v-66.752h103.936v-31.776H234.944v239.84h145.12v-31.936H272.64zM550.144 398.976c-13.76-4.544-29.568-6.848-47.36-6.848h-72.48v239.84h37.664v-90.752h36.224c17.28 0 32.704-2.752 46.336-8.256 13.6-5.504 24.32-13.92 32.096-25.184s11.68-25.664 11.68-43.168c0-18.016-3.904-32.32-11.776-42.912-7.808-10.592-18.592-18.176-32.384-22.72z m-6.912 100.608c-9.28 7.52-23.488 11.296-42.688 11.296h-32.576v-88.224h31.328c19.072 0 33.472 3.04 43.232 9.152 9.76 6.08 14.624 17.024 14.624 32.832 0 15.744-4.64 27.424-13.92 34.944zM776.096 525.472c-9.152-9.76-20.864-17.632-35.04-23.68l-32.896-13.984a285.28 285.28 0 0 1-18.592-8.416c-5.92-2.976-10.784-6.656-14.528-11.04-3.776-4.384-5.632-10.08-5.632-17.088 0-9.44 3.68-16.864 11.04-22.336 7.36-5.472 17.152-8.192 29.312-8.192 10.592 0 20.16 1.92 28.672 5.728 8.544 3.808 16.544 9.056 24.096 15.744l19.872-24.16c-9.12-9.216-20-16.544-32.672-22.016-12.672-5.472-25.984-8.192-39.968-8.192-15.168 0-28.672 2.88-40.544 8.672-11.872 5.792-21.184 13.632-27.968 23.616-6.784 9.952-10.176 21.248-10.176 33.856 0 11.552 2.464 21.408 7.392 29.568s11.136 14.912 18.592 20.256c7.456 5.344 15.072 9.664 22.816 12.96l33.216 14.304c7.328 3.296 13.888 6.464 19.712 9.536 5.824 3.072 10.4 6.848 13.76 11.296 3.328 4.448 5.024 10.336 5.024 17.632 0 10.08-3.936 18.24-11.776 24.48-7.84 6.24-19.008 9.376-33.536 9.376-11.552 0-22.912-2.56-34.08-7.712s-21.12-12-29.792-20.576l-22.08 25.92c10.912 11.136 23.776 19.776 38.528 25.984 14.784 6.208 30.4 9.312 46.816 9.312 17.472 0 32.512-3.168 45.056-9.472s22.24-14.72 28.992-25.28 10.176-22.24 10.176-35.04c-0.064-17.632-4.64-31.296-13.792-41.056z"
                    p-id="1249"></path>
                </>
              </Indicator>
              <Indicator size={50} value={1} title="BMS故障">
                <>
                  <path
                    d="M749.216 892.096l-27.136-43.424C839.008 775.584 908.8 649.728 908.8 512c0-133.216-66.336-256.832-177.408-330.688l28.352-42.624C885.12 222.048 960 361.6 960 512c0 155.488-78.784 297.568-210.784 380.096zM274.784 892.128C142.816 809.568 64 667.488 64 512c0-150.4 74.88-289.952 200.256-373.312l28.352 42.624C181.536 255.168 115.2 378.784 115.2 512c0 137.728 69.792 263.584 186.72 336.704l-27.136 43.424z"
                    p-id="1094"></path>
                  <path
                    d="M512 848c-185.28 0-336-150.72-336-336S326.72 176 512 176s336 150.72 336 336-150.72 336-336 336z m0-620.8c-157.024 0-284.8 127.776-284.8 284.8 0 157.056 127.776 284.8 284.8 284.8 157.056 0 284.8-127.744 284.8-284.8 0-157.024-127.744-284.8-284.8-284.8z"
                    p-id="1095"></path>
                  <path
                    d="M427.296 683.456V346.944h101.696c24.992 0 47.136 3.2 66.464 9.6 19.328 6.4 34.496 17.024 45.504 31.904 11.008 14.88 16.512 34.944 16.512 60.224 0 24.544-5.472 44.704-16.384 60.544-10.912 15.84-25.952 27.616-45.056 35.328-19.104 7.744-40.768 11.584-65.024 11.584h-50.848v127.328h-52.864z m52.864-169.92h45.728c26.912 0 46.88-5.28 59.872-15.84 13.024-10.56 19.52-26.912 19.52-49.056s-6.848-37.504-20.512-46.048c-13.696-8.544-33.888-12.832-60.672-12.832h-43.936v123.776z"
                    p-id="1096"></path>
                  <path d="M252.2912 697.0688l454.4-454.4 36.2048 36.2016-454.4 454.4z" p-id="1097"></path>
                </>
              </Indicator>
              <Indicator size={50} value={1} title="M1电机">
                <>
                  <path
                    d="M814.848 835.584l-35.008-37.376c80.064-74.944 124.16-176.608 124.16-286.208 0-216.16-175.84-392-392-392S120 295.84 120 512c0 109.44 43.968 210.976 123.808 285.888l-35.04 37.344C119.808 751.744 68.8 633.952 68.8 512 68.8 267.616 267.616 68.8 512 68.8S955.2 267.616 955.2 512c0 122.144-51.168 240.064-140.352 323.584z"
                    p-id="2326"></path>
                  <path
                    d="M721.216 890.816l184.256-39.584-144.672-144.672zM317.856 701.184l150.4-453.824h82.4l150.368 453.824h-75.776l-38.208-129.312H429.44l-38.784 129.312H317.856z m146.464-246.304l-18.336 61.056h123.904l-18.048-61.056c-7.616-24.672-14.88-49.568-21.792-74.752-6.912-25.152-13.792-50.56-20.608-76.224h-3.008c-6.624 25.856-13.44 51.328-20.448 76.384a3969.92 3969.92 0 0 1-21.664 74.592z"
                    p-id="2327"></path>
                </>
              </Indicator>
              <Indicator size={50} value={0} title="M2电机">
                <>
                  <path
                    d="M814.848 835.584l-35.008-37.376c80.064-74.944 124.16-176.608 124.16-286.208 0-216.16-175.84-392-392-392S120 295.84 120 512c0 109.44 43.968 210.976 123.808 285.888l-35.04 37.344C119.808 751.744 68.8 633.952 68.8 512 68.8 267.616 267.616 68.8 512 68.8S955.2 267.616 955.2 512c0 122.144-51.168 240.064-140.352 323.584z"
                    p-id="2326"></path>
                  <path
                    d="M721.216 890.816l184.256-39.584-144.672-144.672zM317.856 701.184l150.4-453.824h82.4l150.368 453.824h-75.776l-38.208-129.312H429.44l-38.784 129.312H317.856z m146.464-246.304l-18.336 61.056h123.904l-18.048-61.056c-7.616-24.672-14.88-49.568-21.792-74.752-6.912-25.152-13.792-50.56-20.608-76.224h-3.008c-6.624 25.856-13.44 51.328-20.448 76.384a3969.92 3969.92 0 0 1-21.664 74.592z"
                    p-id="2327"></path>
                </>
              </Indicator>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}
